#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
int main()
{
	char a[] = "abcdefghi";
	char b[20] = { 0 };
	FILE* pf = fopen("file.txt", "w");
	if (pf == NULL)
	{
		perror("fopen");
		return 1;
	}
	fputs(a, pf);
	fclose(pf);
	pf = NULL;
	pf= fopen("file.txt", "r");
	fseek(pf, 3, SEEK_SET);
	fgets(b, 6, pf);
	printf("%s", b);
	fclose(pf);
	pf = NULL;
}